<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        *{
            padding: 0;
            margin: 0;
        }

        body{
            height: 200vh;
        }

        .main{
            position: relative;
            width: 500px;
            height: 500px;
            border: 1px solid black;
        }

        /* relative 相对定位 */
        .container{
            position: relative;
            left: 100px;
            top: 100px;
            width: 200px;
            height: 200px;
            background-color: aqua;
        }

        /* absolute 绝对定位 */
        /* fixed 固定定位 */
        /* .container{
            position: absolute;
            left: 0px;
            top: 0px;
            width: 200px;
            height: 200px;
            background-color: aqua;
        } */

        .div1{
            width: 200px;
            height: 200px;
            background-color: bisque;
        }
    </style>
</head>
<body>
    <!-- <div class="main"> -->
    <div class="container"></div>
    <div class="div1"></div>
<!-- </div> -->
</body>
</html>